package com.springinaction.springidol;

import java.util.Map;
import java.util.Map.Entry;

public class OneManBandMapped implements Performer {

	private Map<String, Instrument> instruments;
	
	public void perform() throws PerformanceException {
		for (Entry<String, Instrument> key : instruments.entrySet()) {
			System.out.println(key.getKey() + ": ");
			key.getValue().play();
		}
	}
	
	public void setInstruments(Map<String, Instrument> instruments) {
		this.instruments = instruments;
	}
}
